﻿<!doctype html>
<html class="no-js">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>注册</title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>

  <link rel="icon" type="image/png" href="assets/i/favicon.png">

  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
  <meta name="msapplication-TileColor" content="#0e90d2">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <script src="assets/js/jquery.min.js"></script>
  <script src="assets/js/baiduTemplate.js"></script>
  <script src="assets/js/amazeui.js"></script>
  <link rel="stylesheet" href="assets/css/amazeui.min.css">
  <script src="assets/js/PublicFunction.js"></script>
 



</head>
<body>

<div id="parent" >
			
	
	
	<div class="am-g" style="font-size:13px;margin:auto auto; padding-top: 20px;">
		<div class="am-u-md-8 am-u-sm-centered">
			<form class="am-form" id="login_user" data-am-validator >
				<p style=" font-size: 20px">新用户注册<p>
	
					    <input class="am-form-field am-input-sm" type="text" placeholder="账号" name="userName"  >		
						</br>
						<input class="am-form-field am-input-sm" type="password" placeholder="密码" name="password">	
						</br>
						<input class="am-form-field am-input-sm" type="password" placeholder="确认密码"  name="passwordag">		
							
						<div class="am-form-group am-form-select">
						<!-- /** 用户类型：0店家、1进口商、2批货员 **/ -->
   							 <select class=" am-input-sm"  name="userType" >
      							<option value="1">进口商</option>
      							<option value="2">批货员</option>
      							<option value="0">店家</option>
    						</select>
  						</div>
  						<p style=" font-size: 20px">个人信息<p>
  						 <input class="am-form-field am-input-sm" type="text" placeholder="姓名" name="realName" >		
						 </br>
						 <input class="am-form-field am-input-sm" type="text" placeholder="身份证号码"  name="identityId">	
						  </br>
						 <input class="am-form-field am-input-sm" type="text" placeholder="QQ"  name="QQ">		
						 </br>
						 <input class="am-form-field am-input-sm" type="text" placeholder="微信号" name="wechat">		
						 </br>
						 <input class="am-form-field am-input-sm" type="text" placeholder="联系电话"name="phonenumber">		
						 </br>
						  <input class="am-form-field am-input-sm" type="text" placeholder="联系地址"name="address">	
						  </br>
						  <input class="am-form-field am-input-sm" type="text" placeholder="邮件"name="email">		
						 </br>
						  <input class="am-form-field am-input-sm" type="text" placeholder="cnpj" name="cnpj">		
						 

						  <div style="width: 70px; margin: auto auto; text-align: center;"  >
						 	 <button type="button" class="am-btn am-btn-primary" data-am-modal="{target: '#my-alert'}"> 上传头像</button>
						  </div>
						
						 	<div style="width:140px;height:140px;  margin: 10px auto;  display: none; " id ="img_div">
						 		<!-- <script type="text/javascript" id='title_img'>
						 		<%=img%> -->
						 			<img class="am-circle" alt="140*140" id ="img" src="" width="140" height="140" />
						 		<!-- </script> -->
						 	</div>
						 
						 
				
					<P><button type="button" class="am-btn am-btn-primary am-btn-block " onClick="actuator('login()')" >注册</button></P>
			</form>
			 <input class="am-form-field am-input-sm" type="hidden" id = "img_name" name = "img_name" value="">	
		<!-- 	</br></br>
				<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "id="" style="background-color:white">
					<ul class="am-navbar-nav am-cf am-avg-sm-4" style="background-color:#f5f5f5">
						<li>
							<a href="javascript:gotoMain()">
							<span class="am-navbar-label" style="color:green;">返回主页</span>
							</a>
						</li>
					</ul>
				</div> -->
		</div>		
	</div>
</div>	

	


<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert" title="-1">
  <div class="am-modal-dialog">
    <div class="am-modal-bd">
   		 <button type="button" class="am-btn am-btn-default am-radius" onclick="gotoPhoto('1','1')">拍照</button>
   	 	 <button type="button" class="am-btn am-btn-default am-radius" onclick="getPhoto('1','1')">选择相册</button>
     <!--  	 <img class="am-circle" src="assets/img/i_p.png" width="50" height="50" alt="调用摄像机" onclick="gotoPhoto()"/>  
		 <img class="am-circle" src="assets/img/i_p.png" width="70" height="70" alt="调用摄像机" onclick="getPhoto()"/> -->
						
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn" id ="close_select">关闭</span>
    </div>
  </div>
</div>





<script type="text/javascript">
<!--页面初始化-->
function init(w ,h) {
	 
	$('#my-alert').on('closed.modal.amui', function(){
		  $("#my-alert").attr("title","-1");
		});
	$('#my-alert').on('opened.modal.amui', function(){
		  $("#my-alert").attr("title","1");  
		});
	
	
	
  };
  /**注册**/
 function login(){
	  var data =$("#login_user").serialize()+"&img_name="+$("#img_name").attr("value");
	  data = decodeURIComponent(data,true); 
	  var msg = LoginFunction.login(data);
	
 }
  
 /**返回主页**/
 function gotoMain(){
	 Public_method.gotoMain();
	 
 }


function setimg(imgs){
	$("#close_select").click();
	if(imgs==null||imgs.length<=0){
		return;
	}
	$("#img").attr("src",imgs);
	$("#img_name").attr("value",imgs);
	$("#img_div").css("display","");
	
	
	
	
	
}
//按返回键的操作
function onBackPressed(){
	var isopen = $("#my-alert").attr("title");
	if(isopen == "1"){
		$("#close_select").click();
	}
	else{
		Public_method.finishActivity();
	}
	
}

</script>
</body>
</html>
